callofdutyresearchfandomcom-20200214-history
Modern Warfare 3 FastFiles
Overview Modern Warfare 3's fastfiles are exactly the same as Modern Warfare 2's FFs. The only difference is that the '.gsc' script files are pre-compiled now. Xbox 360 FFs have one more difference; the data is no longer compressed using zlib, it uses some other form of compression now. Main FF Structure char8 magic = ReadString(8); //Must be "IWff0100" or "IWffu100" int32 version = ReadInt32(); // Must be 0x70 (112) bool allowOnlineUpdate = ReadBool(); int32 highDateTime = ReadInt32(); // FILETIME structure (Big Endian) int32 lowDateTime = ReadInt32(); int32 language = ReadInt32(); int32 padding = ReadInt32(); //Must be less than 0x4300 if (padding > 0) { ReadBytes(padding * 0xC); } int32 unusedSize = ReadInt32(); int32 usedSize = ReadInt32(); Magic Specifies wether the FF is signed or unsigned. The magic will be "IWff0100" if the FF is signed, and "IWffu100" for unsigned. Unsigned files may be modified without modifying the .Xex (Xbox 360 Executable) or .Self (PS3 Executable). Version Specifies the FF version. The magic and version are the 2 things that appear on every CoD game's FFs. The version tells how to read the rest of the FF and is different for every game. On Modern Warfare 3, the version will always be 0x70. AllowOnlineUpdate Whether or not the contents of the FF can be updated and loaded from a title update. The game doesn't check this value. FileCreationTime The moment this FF was created. All retail FFs off of the ISO appear to be created between 11 AM to 1 PM on September 19, 2011. Language Tells what language the FF is in. The global language is this on the very first FF, and all FFs loaded after must match the global language. If this is not the first FF loaded, then this must match the global language. english - 0x01 french - 0x02 german - 0x03 italian - 0x04 spanish - 0x05 british - 0x06 russian - 0x07 polish - 0x08 korean - 0x09 taiwanese - 0x0A japanese - 0x0B chinese - 0x0C thai - 0x0D leet - 0x0E czech - 0x0F Padding Size of the padding used for the header. The game skips past the padding when loading the fastfile. UnusedFileSize Usually less than UsedFileSize, and suggested by the name, not used at all. UsedFileSize The file size used to decompress the zone later on. Continue... Continuing to read the FF depends on what the magic was... IWffu100 (Unsigned) int32 chunk = 0x2000; byte[] compressed = new bytechunk; byte[] decompressed = new byte* 4; int32 read; // read and decompress the file in 0x2000 byte chunks while ((read = Read(compressed, 0, chunk)) > 0) { decompressed = Decompress(compressed); zone.WriteBytes(decompressed); } From there, the zone is opened and read. IWff0100 (Signed) char8 magic = ReadString(8); //Must be "IWffs100" int32 Unknown1 = ReadInt32(); byte0x20 rsaSigChecksum = ReadBytes(0x20); byte0x100 rsaSig = ReadBytes(0x100); char0x20 fileName = ReadString(0x20); int32 Unknown2 = ReadInt32(); byte0x1EB0 bigSigBlock = ReadBytes(0x1EB0); byte[][] sigBlocks; byte[] compressedData; for (i = 0; i < (fileSize / 0x31510) + 1; i++) //I'm not 100% sure that everything in this for loop has remain constant in MW3 { for (j = 0; j < 0x100; j++) sigBlocksi+ 0x20 = ReadBytes(0x20); for (j = 0; j < 0x100; j++) compressedData.Add(ReadBytes(0x2000)); //Add compressed data to any previous// }